package com.hdax.dmw.item.api;

import com.hdax.dmw.common.utils.Result;
import com.hdax.dmw.item.dtos.IndexNavDto;
import com.hdax.dmw.item.service.ItemTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class IndexNavApi {

    @Autowired
    private ItemTypeService itemTypeService;

    @PostMapping(path = "/index/nav")
    public Result<List<IndexNavDto>> nav() throws Exception{
        return itemTypeService.navs();
    }
}
